package com.softplus.carrefour.hd.bltier.entity;

import java.io.Serializable;

import java.util.Date;
import java.util.HashMap;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;


/** @author Hibernate CodeGenerator */
public class RoutePath implements Serializable {
    //Static Value
    public static String ESCALATE = "E";
    public static String RETURN = "R";

    private static final HashMap direction = new HashMap();
    static {
        direction.put("E", "Escalate");
        direction.put("R", "Return");
    }

    static String getDirectionDesc(String cc) {
        if (direction.size() == 0) {
            direction.put("E", "Escalate");
            direction.put("R", "Return");
        }
        return (String)direction.get(cc);
    }

    /** identifier field */
    private com.softplus.carrefour.hd.bltier.entity.RoutePathPK comp_id;

    /** nullable persistent field */
    private String unattendPeriod;

    /** nullable persistent field */
    private String autoEscalatePeriod;

    /** nullable persistent field */
    private String routeDirection;

    /** nullable persistent field */
    private boolean defaultAutoEscalate;

    /** nullable persistent field */
    private boolean status;

    /** nullable persistent field */
    private String credBy;

    /** nullable persistent field */
    private Date credDate;

    /** nullable persistent field */
    private String updBy;

    /** nullable persistent field */
    private Date updDate;

    /** full constructor */
    public RoutePath(com.softplus.carrefour.hd.bltier.entity.RoutePathPK comp_id, 
                     String unattendPeriod, String autoEscalatePeriod, 
                     String routeDirection, boolean defaultAutoEscalate, 
                     boolean status, String credBy, Date credDate, 
                     String updBy, Date updDate) {
        this.comp_id = comp_id;
        this.unattendPeriod = unattendPeriod;
        this.autoEscalatePeriod = autoEscalatePeriod;
        this.routeDirection = routeDirection;
        this.defaultAutoEscalate = defaultAutoEscalate;
        this.status = status;
        this.credBy = credBy;
        this.credDate = credDate;
        this.updBy = updBy;
        this.updDate = updDate;
    }


    /** default constructor */
    public RoutePath() {
    }

    /** minimal constructor */
    public RoutePath(com.softplus.carrefour.hd.bltier.entity.RoutePathPK comp_id) {
        this.comp_id = comp_id;
    }

    public com.softplus.carrefour.hd.bltier.entity.RoutePathPK getComp_id() {
        return this.comp_id;
    }

    public void setComp_id(com.softplus.carrefour.hd.bltier.entity.RoutePathPK comp_id) {
        this.comp_id = comp_id;
    }

    public String getUnattendPeriod() {
        return this.unattendPeriod;
    }

    public void setUnattendPeriod(String unattendPeriod) {
        this.unattendPeriod = unattendPeriod;
    }

    public String getAutoEscalatePeriod() {
        return this.autoEscalatePeriod;
    }

    public void setAutoEscalatePeriod(String autoEscalatePeriod) {
        this.autoEscalatePeriod = autoEscalatePeriod;
    }

    public String getRouteDirection() {
        return this.routeDirection;
    }

    public void setRouteDirection(String routeDirection) {
        this.routeDirection = routeDirection;
    }

    public boolean isDefaultAutoEscalate() {
        return this.defaultAutoEscalate;
    }

    public void setDefaultAutoEscalate(boolean defaultAutoEscalate) {
        this.defaultAutoEscalate = defaultAutoEscalate;
    }

    public boolean isStatus() {
        return this.status;
    }

    public void setStatus(boolean status) {
        this.status = status;
    }

    public String getCredBy() {
        return this.credBy;
    }

    public void setCredBy(String credBy) {
        this.credBy = credBy;
    }

    public Date getCredDate() {
        return this.credDate;
    }

    public void setCredDate(Date credDate) {
        this.credDate = credDate;
    }

    public String getUpdBy() {
        return this.updBy;
    }

    public void setUpdBy(String updBy) {
        this.updBy = updBy;
    }

    public Date getUpdDate() {
        return this.updDate;
    }

    public void setUpdDate(Date updDate) {
        this.updDate = updDate;
    }

    public String toString() {
        return new ToStringBuilder(this).append("comp_id", 
                                                getComp_id()).toString();
    }

    public boolean equals(Object other) {
        if ((this == other))
            return true;
        if (!(other instanceof RoutePath))
            return false;
        RoutePath castOther = (RoutePath)other;
        return new EqualsBuilder().append(this.getComp_id(), 
                                          castOther.getComp_id()).isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder().append(getComp_id()).toHashCode();
    }

}
